package com.service.bean.oil;

import java.sql.Timestamp;
import java.util.Date;

public class OilChangeBean {
	
	public int id;
	public String changeType;
	/**
	 * 油量变化日期
	 */
	public String changeDate;
	/**
	 * 油卡号
	 */
	public String oilCardNO;
	/**
	 * 油量变化前的时间
	 */
	public Date changeTimeForm;
	/**
	 * 油量变化后的时间
	 */
	public Date changeTimeTo;
	/**
	 * 变化前的油量
	 */
	public double changeOilFrom;
	/**
	 * 变化后的油量
	 */
	public double changeOilTo;
	/**
	 * 设备号
	 */
	public String equipmentId;
	/**
	 * 项目编号
	 */
	public String projectId;
	/**
	 * 油量的变化量
	 */
	public double changeAmt ;
	public double oilAmt ;
	public double oilCardAmt; 
	/**
	 * 支付模式
	 */
	public String payMode;    
	public String remark;    
	public String status;
	/**
	 * 柴油单价
	 */
	public double oilUnitPrice;
	/**
	 * 加油价格
	 */
	public double oilPrice;
	/**
	 * 公司编号
	 */
	public String companyCode;
	
	public Object[] getAll() {
		Object[] array = new Object[18];

		array[0] = "'"  + this.changeType + "'";
		array[1] = "'"  + this.companyCode + "'";
		array[2] = "'"  + this.changeDate + "'";
		array[3] = this.oilCardNO == null ? this.oilCardNO :"'"  + this.oilCardNO + "'";
		array[4] = this.changeTimeForm == null ? this.changeTimeForm : "'" + new Timestamp(this.changeTimeForm.getTime()) + "'";
		array[5] = this.changeTimeTo == null ? this.changeTimeTo : "'" + new Timestamp(this.changeTimeTo.getTime()) + "'";
		array[6] = String.valueOf(this.changeOilFrom);
		array[7] = String.valueOf(this.changeOilTo);
		array[8] = "'"  + this.equipmentId + "'";
		array[9] = this.projectId == null ? this.projectId :"'"  + this.projectId + "'";
		array[10] = String.valueOf(this.changeAmt);
		array[11] = String.valueOf(this.oilAmt);
		array[12] = String.valueOf(this.oilCardAmt);
		array[13] = "'"  + this.payMode + "'";
		array[14] = "'"  + this.remark + "'";
		array[15] = "'"  + this.status + "'";
		array[16] = String.valueOf(this.oilUnitPrice);
		array[17] = String.valueOf(this.oilPrice);

		return array;
	}
	
}
